package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysTeacherUserMapper;
import com.ruoyi.system.domain.SysTeacherUser;
import com.ruoyi.system.service.ISysTeacherUserService;

/**
 * 用户与教师关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-16
 */
@Service
public class SysTeacherUserServiceImpl implements ISysTeacherUserService 
{
    @Autowired
    private SysTeacherUserMapper sysTeacherUserMapper;

    /**
     * 查询用户与教师关系
     * 
     * @param teacherId 用户与教师关系主键
     * @return 用户与教师关系
     */
    @Override
    public SysTeacherUser selectSysTeacherUserByTeacherId(Long teacherId)
    {
        return sysTeacherUserMapper.selectSysTeacherUserByTeacherId(teacherId);
    }

    /**
     * 查询用户与教师关系列表
     * 
     * @param sysTeacherUser 用户与教师关系
     * @return 用户与教师关系
     */
    @Override
    public List<SysTeacherUser> selectSysTeacherUserList(SysTeacherUser sysTeacherUser)
    {
        return sysTeacherUserMapper.selectSysTeacherUserList(sysTeacherUser);
    }

    /**
     * 新增用户与教师关系
     * 
     * @param sysTeacherUser 用户与教师关系
     * @return 结果
     */
    @Override
    public int insertSysTeacherUser(SysTeacherUser sysTeacherUser)
    {
        return sysTeacherUserMapper.insertSysTeacherUser(sysTeacherUser);
    }

    /**
     * 修改用户与教师关系
     * 
     * @param sysTeacherUser 用户与教师关系
     * @return 结果
     */
    @Override
    public int updateSysTeacherUser(SysTeacherUser sysTeacherUser)
    {
        return sysTeacherUserMapper.updateSysTeacherUser(sysTeacherUser);
    }

    /**
     * 批量删除用户与教师关系
     * 
     * @param teacherIds 需要删除的用户与教师关系主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherUserByTeacherIds(Long[] teacherIds)
    {
        return sysTeacherUserMapper.deleteSysTeacherUserByTeacherIds(teacherIds);
    }

    /**
     * 删除用户与教师关系信息
     * 
     * @param teacherId 用户与教师关系主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherUserByTeacherId(Long teacherId)
    {
        return sysTeacherUserMapper.deleteSysTeacherUserByTeacherId(teacherId);
    }
}
